
package com.cgmnx.admin.web.controller.login;

import com.cgmnx.admin.biz.login.LoginBiz;
import com.cgmnx.admin.common.util.JacksonMapper;
import com.cgmnx.admin.web.controller.BaseAdminController;
import com.cgmnx.admin.web.model.vm.MenuTreeVm;
import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * 运营端登录
 */
@Slf4j
@Controller
public class LoginUiAdminController extends BaseAdminController {

    @Autowired
    private LoginBiz loginBiz;

    /**
     * @return
     */
    @RequestMapping(value = "/cgmnx/login.html")
    public ModelAndView detail() {

        ModelAndView modelAndView = new ModelAndView("pages/login/login");
        modelAndView.addObject("userInfo", "{}");
        modelAndView.addObject("menuList", JacksonMapper.encodeQuietly(Lists.<MenuTreeVm>newArrayList()));
        modelAndView.addObject("bizInfo", "{}");
        return modelAndView;
    }

    @RequestMapping(value = "/cgmnx/qrlogin.html")
    public ModelAndView qrLogin() {

        ModelAndView modelAndView = new ModelAndView("pages/login/qrlogin");
        modelAndView.addObject("userInfo", "{}");
        modelAndView.addObject("menuList", JacksonMapper.encodeQuietly(Lists.<MenuTreeVm>newArrayList()));
        modelAndView.addObject("bizInfo", "{}");


        return modelAndView;
    }

}